import { ComponentMetadata, Snippet } from '@alilc/lowcode-types';

const CityStationLeftMeta: ComponentMetadata = {
  componentName: 'CityStationLeft',
  title: '城站专题左侧',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  group: '城站专题',
  category: '数据展示',
  priority: 0,
  npm: {
    package: 'hzdz-charts',
    version: '0.1.0',
    exportName: 'CityStationLeft',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        title: '运营现状组件配置',
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'operationStatus.statusBar.chineseText',
            title: '运营现状中文标题',
            setter: 'StringSetter',
            defaultValue: '运营现状',
          },
          {
            name: 'operationStatus.statusBar.englishText',
            title: '运营现状英文标题',
            setter: 'StringSetter',
            defaultValue: 'Operation Status',
          },
          {
            name: 'operationStatus.statusBar.theme',
            title: '运营现状主题',
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '深色', value: 'dark' },
                  { label: '浅色', value: 'light' }
                ]
              }
            },
            defaultValue: 'dark',
          },
        ],
      },
      {
        title: '状态栏组件配置',
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'statusBar.chineseText',
            title: '状态栏中文标题',
            setter: 'StringSetter',
            defaultValue: '城站专题',
          },
          {
            name: 'statusBar.englishText',
            title: '状态栏英文标题',
            setter: 'StringSetter',
            defaultValue: 'CITY STATION',
          },
          {
            name: 'statusBar.theme',
            title: '状态栏主题',
            setter: {
              componentName: 'RadioGroupSetter',
              props: {
                options: [
                  { label: '深色', value: 'dark' },
                  { label: '浅色', value: 'light' }
                ]
              }
            },
            defaultValue: 'dark',
          },
        ],
      },
      {
        title: '标题组件配置',
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'titleHeader.title',
            title: '标题文字',
            setter: 'StringSetter',
            defaultValue: '专题分析',
          },
        ],
      },
      {
        title: '密度显示组件配置',
        display: 'block',
        type: 'group',
        items: [
          {
            name: 'densityDisplay.moduleCount',
            title: '模块数量',
            setter: {
              componentName: 'NumberSetter',
              props: {
                min: 1,
                max: 12,
                step: 1
              }
            },
            defaultValue: 4,
          },
          {
            name: 'densityDisplay.showValues',
            title: '显示数值',
            setter: 'BoolSetter',
            defaultValue: true,
          },
          {
            name: 'densityDisplay.dataItems',
            title: '数据项配置',
            setter: {
              componentName: 'ArraySetter',
              props: {
                itemSetter: {
                  componentName: 'ObjectSetter',
                  props: {
                    config: {
                      items: [
                        {
                          name: 'label',
                          title: '标签文字',
                          setter: 'StringSetter'
                        },
                        {
                          name: 'value',
                          title: '数值',
                          setter: 'NumberSetter'
                        },
                        {
                          name: 'icon',
                          title: '图标',
                          setter: 'StringSetter'
                        }
                      ]
                    }
                  }
                }
              }
            },
            defaultValue: [
              { label: '进站人数', value: 1250, icon: '🚶' },
              { label: '出站人数', value: 980, icon: '🚶' },
              { label: '候车人数', value: 320, icon: '🚶' },
              { label: '工作人员', value: 45, icon: '👷' }
            ],
          },
        ],
      },
             {
         title: '执法管理组件配置',
         display: 'block',
         type: 'group',
         items: [
           {
             name: 'lawEnforcement',
             title: '执法管理组件属性',
             setter: 'JsonSetter',
             description: '配置执法管理组件的所有属性',
           },
         ],
       },
    ],
  },
  snippets: [
    {
      title: '城站专题左侧',
      screenshot: '',
      schema: {
        componentName: 'CityStationLeft',
        props: {
          operationStatus: {
            statusBar: {
              chineseText: '运营现状',
              englishText: 'Operation Status',
              theme: 'dark'
            }
          },
          statusBar: {
            chineseText: '空间安全',
            englishText: 'SPACE SECURITY',
            theme: 'dark'
          },
          titleHeader: {
            title: '人员密度饱和度'
          },
          densityDisplay: {
            moduleCount: 4,
            showValues: true,
            dataItems: [
              { label: '候车大厅', value: 870110, icon: 'static/images/chengzhanzhuanti/候车大厅.png' },
              { label: '地铁', value: 870110, icon: '/static/images/chengzhanzhuanti/地铁2.png' },
              { label: '到达层', value: 870110, icon: '/static/images/chengzhanzhuanti/到达层2.png' },
              { label: '出租车', value: 870110, icon: '/static/images/chengzhanzhuanti/出租车2.png' }
            ]
          },
                     lawEnforcement: {}
        },
      },
    },
  ],
};

export default CityStationLeftMeta;
